{% extends "space/rest/index.html" %}


{% block script %}
		$("#id_cuisine").mcDropdown("#id_cuisinemenu"); 
{% endblock %}

{% block right_container %}



<ul id="id_cuisinemenu" class="mcdropdown_menu">
						{% for cuisine in cuisines %}
							{% if cuisine.level == 1 %}
			                <li rel='{{cuisine.id}}'>{{cuisine.name}}
			                	{% if cuisine.cuisine_set.all %}
			                	<ul>
		                		{% for childcuisine in cuisine.cuisine_set.all %}
			                        <li rel='{{childcuisine.id}}'>{{childcuisine.name}}</li>
			                     {% endfor %} 
			                     </ul>
			                     {% endif %}   
			                </li>
			                {% endif %}
			             {% endfor %} 
					</ul>

<div class="admin_position">商户管理> 餐厅信息> </div>
<form method="post" action="" enctype="multipart/form-data" name="restForm" id="restForm">
	<table cellpadding="0" cellspacing="0" width="50%" id="add_content"><tbody>
            <tr>
               <td class="left">{{form.name.label}}</td>
               <td  class="td_bg">{{form.name}}</td>
               <td class="red">{% for error in form.name.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.alias.label}}</td>
               <td  class="td_bg">{{form.alias}}</td>
               <td class="red">{% for error in form.alias.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.desc.label}}</td>
               <td  class="td_bg">{{form.desc}}</td>
               <td class="red">{% for error in form.desc.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.img.label}}</td>
               <td  class="td_bg">
               	<img alt="" width="100" height="100" src="/image/{{rest.img}}"><br/>
               	{{form.img}}
               </td>
               <td class="red">{% for error in form.img.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.cuisine.label}}</td>
               <td><input type="text" name="cuisine" id="id_cuisine" value="{{rest.cuisine.id}}" /></td>
               <td class="red">{% for error in form.cuisine.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
              <td class="left">{{form.bus_area.label}}</td>
              <td class="td_bg">{{form.bus_area}}</td>
              <td class="red">{% for error in form.bus_area.errors %}{{error}}{%endfor %}</td>
           </tr>
            <tr>
               <td class="left">{{form.address.label}}</td>
               <td  class="td_bg">{{form.address}}</td>
               <td class="red">{% for error in form.address.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.phone.label}}</td>
               <td  class="td_bg">{{form.phone}}</td>
               <td class="red">{% for error in form.phone.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.spend.label}}</td>
               <td  class="td_bg">{{form.spend}}</td>
               <td class="red">{% for error in form.spend.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.open_time.label}}</td>
               <td  class="td_bg">{{form.open_time}}</td>
               <td class="red">{% for error in form.open_time.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.close_time.label}}</td>
               <td  class="td_bg">{{form.close_time}}</td>
               <td class="red">{% for error in form.close_time.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.mobile.label}}</td>
               <td  class="td_bg">{{form.mobile}}</td>
               <td class="red">{% for error in form.mobile.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
               <td class="left">{{form.confirm_auto.label}}</td>
               <td  class="td_bg">{{form.confirm_auto}}</td>
               <td class="red">{% for error in form.confirm_auto.errors %}{{error}}{% endfor %}</td>
            </tr>
            <tr>
            	<td class="left" colspan="3"><input type="submit" name="button" value="提交内容" /></td>
            </tr>
         </tbody>
     </table>
     {% csrf_token %}
</form>   
{% endblock%}